TEMPORALS

Global Seafood

Area Segmented Facet

Photo by Paul Einerhand on Unsplash

Photo by Paul Einerhand on Unsplash

I want everybody to go jump in the ocean to see for themselves how beautiful it is,
how important it is to get acquainted with fish swimming in the ocean,
rather than just swimming with lemon slices and butter…
— Sylvia Earle


Ingest

by country, year, fish, and production tonnes

# Load csv data file
df <- read.csv("archetypes/global-seafood/seafood-and-fish-production.csv", header = TRUE, stringsAsFactors = FALSE, encoding = "UTF-8")
head(df, n=10)

Plot

facet by country

theme_opts <- theme(
    text = element_text(family = "inconsolata", size = 10), 
    plot.title = element_text(color = "black", size = 16, face = "bold"),
    plot.subtitle = element_text(color = "black", size = 12),
    plot.caption = element_text(color = "#555555", size = 10),
    panel.border = element_blank(),
    panel.background = element_blank(),
    legend.position='top',
    panel.spacing.x = unit(1, "lines"),
    panel.spacing.y = unit(1, "lines"),
    panel.grid.minor = element_blank(),
    strip.text = element_text(size = 8.5, face = "bold"),
    strip.background = element_blank()
)

fish_palette <- c(
  "Pelagic" = "#001e54", 
  "Crustaceans" = "#489cd4", 
  "Cephalopods" = "#00b4b5", 
  "Demersal" = "#a2f1f2", 
  "Freshwater" = "#daa494", 
  "Molluscs" = "#7b2c21", 
  "Other Marine" = "#4e2012"
)

# Plot
v1 <- 
  ggplot(df, aes(Year, Prod, fill = Fish, group = Fish)) +
  geom_area(position = "fill", colour = "black", size = .2, alpha = .4) +
  # geom_vline(aes(xintercept = variable), size = 0.1, color = "gray80") +
  facet_wrap( ~ Entity, ncol = 10) +
  scale_x_continuous(breaks = c(1970, 1990, 2010)) +
  scale_y_continuous(labels = scales::percent) +
  scale_fill_manual(values = fish_palette) +
  labs(title = "Seafood and fish production",
       subtitle = "by thousand tonnes, percent of produced",
       caption = "Source: OurWorldInData",
       x = NULL,
       y = NULL) +
  theme_bw() +
  theme_opts

girafe(ggobj = v1, width_svg = 720/72, height_svg = 1280/72,
       options = list(opts_sizing(rescale = TRUE, width = 0.75))
)

References

citations for narrative and data sources